Ext.define('App.controller.city.CityViewController', {
	extend : 'Ext.app.ViewController',
	alias : 'controller.cityViewController',
	menu : Ext.widget('menu'),
	control : {
		'cityView cityList' : {
			beforerender : function(grid) {
				var buttons = {

                        'refresh': function (permit) {
                            Ext.StoreMgr.get('city.CityStore').reload();
                        },
                        'expand':function(){
                            grid.getRootNode().expand(true)
                        },
                        'collapse':function(){
                            grid.getRootNode().collapseChildren(true);
                        }
				};
				BaseUtil.createPermitTbar(grid, buttons);
			},
			render : function() {
				BaseUtil.loadStore(Ext.StoreMgr.get('city.CityStore'));
			}
		},

	}
});